<%@ Page Language="C#" MasterPageFile="~/PgMaster.master" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
<div>
<div class="arrowlistmenu">
<h3 class="headerbar">Admin</h3>
  <ul>   
    <li> <asp:LinkButton ID="EditMenu" runat="server" OnClick="EditMenu_Click">Edit Menu Items</asp:LinkButton></li><li><asp:LinkButton ID="EditField" runat="server" OnClick="EditField_Click">Edit Field Items</asp:LinkButton></li></ul>
</div>
<div><asp:Label ID="lblMessage" runat="server"  Font-Bold="True"></asp:Label> </div>
<div id="rightside" style="width:640px; float:left">
<asp:Panel ID="PanelMenu" runat="server" width="640px">
 <asp:GridView ID="GridViewMenu" runat="server" Width="635px" 
              AutoGenerateColumns="False" 
              OnRowDeleted="GridViewMenu_RowDeleted" 
              OnRowUpdated="GridViewMenu_RowUpdated" 
              ShowFooter="true" 
              AllowSorting="True" 
              AutoGenerateDeleteButton="True"
              AutoGenerateEditButton="True" 
              OnRowCommand="GridViewMenu_RowCommand" OnRowUpdating="GridViewMenu_RowUpdating" OnRowDeleting="GridViewMenu_RowDeleting"
              OnRowEditing="GridViewMenu_RowEditing" OnRowCancelingEdit="GridViewMenu_RowCancelingEdit">
    <RowStyle BackColor="WhiteSmoke" />

   <FooterStyle BackColor="#404040" Font-Bold="True" ForeColor="White" />

   <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />

   <HeaderStyle BackColor="#404040" Font-Bold="True" ForeColor="White" />

   <AlternatingRowStyle BackColor="White" />
<Columns>
 <asp:TemplateField HeaderText="Menu ID" SortExpression="ManuID" >
    <ItemTemplate>
    <asp:Label ID="lblMenuID" runat="server" Text='<%#Eval("MenuID") %>'>                           
    </asp:Label>
    </ItemTemplate>
   
    <FooterTemplate>
    <asp:Button ID="btnInsert" runat="server" Text="Insert" CommandName="Add"  OnClick="AddNewMenu"/>             
    </FooterTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Menu Text" SortExpression="Menu">
                       
    <ItemTemplate>
    <asp:Label ID="lblMenuText" runat="server" Text='<%#Eval("Text") %>'>
               
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtMenuText" runat="server" 
                 Text='<%#Bind("Text") %>'>
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtMText" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Description" 
                       SortExpression="MenuDesc">
    <ItemTemplate>
    <asp:Label ID="lblMenuDesc" runat="server" 
               Text='<%#Eval("Description") %>'>
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtMenuDesc" runat="server" 
                 Text='<%#Bind("Description") %>'>
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtMDesc" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Parent Link" 
                       SortExpression="Parent">
    <ItemTemplate>
    <asp:Label ID="lblParentID" runat="server" 
               Text='<%#Eval("ParentID") %>'>
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtParentID" runat="server" 
                 Text='<%#Bind("ParentID") %>'>
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtPID" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="BusType" 
                       SortExpression="BusType">
    <ItemTemplate>
    <asp:Label ID="lblBusType" runat="server" 
               Text='<%#Eval("BUS_TYPE") %>'>
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtBusType" runat="server" 
                 Text='<%#Bind("BUS_TYPE") %>'>
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtBType" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
<asp:Panel ID="PanelField" runat="server" width="640px">
 <asp:GridView ID="GridViewField" runat="server" Width="635px" 
              AutoGenerateColumns="False" 
              OnRowDeleted="GridViewField_RowDeleted" 
              OnRowUpdated="GridViewField_RowUpdated" 
              ShowFooter="true" 
              AllowSorting="True" 
              AutoGenerateDeleteButton="True"
              AutoGenerateEditButton="True" 
              OnRowCommand="GridViewField_RowCommand" OnRowUpdating="GridViewField_RowUpdating" OnRowDeleting="GridViewField_RowDeleting"
              OnRowEditing="GridViewField_RowEditing" OnRowCancelingEdit="GridViewField_RowCancelingEdit">
     <RowStyle BackColor="WhiteSmoke" />

   <FooterStyle BackColor="#404040" Font-Bold="True" ForeColor="White" />

   <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />

   <HeaderStyle BackColor="#404040" Font-Bold="True" ForeColor="White" />

   <AlternatingRowStyle BackColor="White" />
<Columns>
 <asp:TemplateField HeaderText="Field ID" SortExpression="FieldID" >
    <ItemTemplate>
    <asp:Label ID="lblFieldID" runat="server" Text='<%#Eval("FID") %>'>                           
    </asp:Label>
    </ItemTemplate>
   
    <FooterTemplate>
    <asp:Button ID="btnInsert" runat="server" Text="Insert" CommandName="Add"  OnClick="AddNewField"/>             
    </FooterTemplate>
    </asp:TemplateField> 
    <asp:TemplateField HeaderText="Field Text" SortExpression="Field">                   
    <ItemTemplate>
    <asp:Label ID="lblFieldText" runat="server" Text='<%#Eval("FTEXT") %>'>          
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtFieldText" runat="server" Text='<%#Bind("FTEXT") %>'>             
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtFText" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="Description" SortExpression="MenuDesc">
                       
    <ItemTemplate>
    <asp:Label ID="lblFieldDepend" runat="server" Text='<%#Eval("F_DEPENDENT_ON") %>'>
               
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtFieldDepend" runat="server" Text='<%#Bind("F_DEPENDENT_ON") %>'>
                 
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtFDepend" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
    
    <asp:TemplateField HeaderText="BusType" 
                       SortExpression="BusType">
    <ItemTemplate>
    <asp:Label ID="lblBusType" runat="server" 
               Text='<%#Eval("BUS_TYPE") %>'>
    </asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
    <asp:TextBox ID="txtBusType" runat="server" 
                 Text='<%#Bind("BUS_TYPE") %>'>
    </asp:TextBox>
    </EditItemTemplate>
    <FooterTemplate>
    <asp:TextBox ID="txtBType" runat="server">
    </asp:TextBox>
    </FooterTemplate>
    </asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>

</div>
</div>
</asp:Content>

